<%--
  Created by IntelliJ IDEA.
  User: jiangxuchuan
  Date: 2022/1/8
  Time: 14:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Company</title>
</head>
<body>
    <!-- 下面的forEach相当于
        List companies = (List)requests.getAttribute("companies");
        for(Company c :companies){
            out.print(...)
        }
        idx.index是索引，一般情况下加1让索引从1开始
     -->
    <c:forEach items="${requestScope.companies}" var="c" varStatus="idx">
        <h1 style="text-align: center;color: aqua">${idx.index + 1}${c.cname}:${c.url}</h1>
    </c:forEach>
</body>
</html>
